package com.kukajenny.bobozan;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.transition.Fade;
import android.transition.Transition;
import android.transition.TransitionInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ProgressBar;

/**
 * Created by zjp on 17-9-21.
 */

public class RoomActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_room);
        setupWindowAnimations();

        EditText roomnum = (EditText) findViewById(R.id.roomnum_button);

        Intent intent = getIntent();
        int id = intent.getIntExtra("from",0);
        if(id==0){
            roomnum.setFocusable(false);
        }

        final LinearLayout wait = (LinearLayout) findViewById(R.id.wait);

        Button start = (Button) findViewById(R.id.start_button);
        start.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //wait.setVisibility(View.VISIBLE);
                Intent intent1 = new Intent(RoomActivity.this,StrategyActivity.class);
                startActivity(intent1);
            }
        });
    }

    private void setupWindowAnimations() {
        Transition fade = TransitionInflater.from(this).inflateTransition(R.transition.activity_fade);
        getWindow().setEnterTransition(fade);
    }
}
